<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>学生信息管理</title>
</head>
<body>
    <h2>学生信息列表</h2>
    <ul id="studentList"></ul>

    <script>
        fetch("/students")
            .then(response => response.json())
            .then(data => {
                const list = document.getElementById("studentList");
                data.forEach(stu => {
                    const li = document.createElement("li");
                    li.textContent = `姓名: ${stu.name}, 学号: ${stu.studentId}`;
                    list.appendChild(li);
                });
            });
    </script>
</body>
</html>